<!--
 * @Author: 可以清心
 * @Description: 
 * @Date: 2023-01-04 16:49:05
 * @LastEditTime: 2023-01-14 19:55:02
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东方低代码平台</title>
</head>
<body>
    <script>
        (function() {
            function getQueryString(name){
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                var r = window.location.search.substr(1).match(reg);

                if(r != null)
                    return unescape(r[2]);
                return null;
            }

            function isPhone() {
                var mobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                return mobile !== null;
            }
            
            var redirectUri = getQueryString('redirect_uri');

            debugger;

            if(isPhone()){
                // 是移动端，到移动端的登录页面
                var url = new URL(redirectUri);

                window.location.href = url.origin + '/m/mobilelogin/index.html';
            }else{
                // pc端
                window.location.href = redirectUri;
            }
        })()
    </script>
</body>
</html>